﻿namespace Rmq.Center
{
    public class UserMessageMsg
    {
        public UserMessageType Type { get; set; }

        public int OrderId { get; set; }
    }

    public class UserMessageProducer : BaseProducer<UserMessageMsg>
    {
        public UserMessageProducer()
            : base(Const.RoutingKeys.UserMessage)
        { }
    }

    public class UserMessageConsumer : BaseConsumer<UserMessageMsg>
    {
        public UserMessageConsumer()
            : base(Const.QueueNames.UserMessage, Const.RoutingKeys.UserMessage)
        { }
    }

    public enum UserMessageType
    {
        挂号成功通知 = 1,
        挂号失败通知 = 2,
        挂号失败退费成功通知 = 3,
        退号成功通知 = 4,
        退号失败通知 = 5,
        退号成功退费成功通知 = 6,
        缴费成功通知 = 7,
        缴费失败通知 = 8,
        缴费失败退款成功通知 = 9,
        停诊退号成功通知 = 10,
    }

    public class TemplateMessage
    {
        /// <summary>
        /// OpenId
        /// </summary>
        public string OpenId { get; set; }

        /// <summary>
        /// 模板id
        /// </summary>
        public string TemplateId { get; set; }

        /// <summary>
        /// 顶部颜色
        /// </summary>
        public string TopColor { get; set; }

        /// <summary>
        /// 链接地址
        /// </summary>
        public string Url { get; set; }

        /// <summary>
        /// 消息数据
        /// </summary>
        public object Data { get; set; }
    }
}